package com.xiaohong.storage.fallback;

import com.xiaohong.storage.feign.StorageTblFeign;
import com.xiaohong.storage.pojo.StorageTbl;
import entity.Result;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author : xiaohong
 * @date : 2021/4/4 18:39
 */
@Component
public class StorageFallback implements StorageTblFeign {
    @Override
    public Result update(StorageTbl storageTbl, Integer id) {
        System.out.println("数据:"+ storageTbl+"和"+id);
        throw new RuntimeException("storage错误，错误日志已保存数据库了哦");
    }

    @Override
    public Result<List<StorageTbl>> findList(StorageTbl storageTbl) {
        System.out.println("数据:"+ storageTbl);
        throw new RuntimeException("storage错误，错误日志已保存数据库了哦");
    }
}
